package com.xxx.config.api;

/**
 * 本地线程放置userId
 *
 * @version 1.0
 * @since 1.0
 */
public class AuditAware{

    // 后续数据多的话，可以用map

    private static final ThreadLocal<Integer> userId = new ThreadLocal<>();
    public static void setUserId(Integer _userId) {
        userId.set(_userId);
    }

    public static Integer getUserId() {
        return userId.get();
    }

}
